/* 
OurSensitiveDetector
John Sparger 3/15/2011

This class derives from G4VSensitiveDetector.
It will generate the hits we will use to calculate
our dose.

*/ 

#ifndef OURSENSITIVEDETECTOR_H
#define OURSENSITIVEDETECTOR_H

#include "G4VSensitiveDetector.hh"
#include "G4HCofThisEvent.hh"
#include "G4Step.hh"
#include "OurHit.hh"
#include "G4THitsCollection.hh"
#include "G4ThreeVector.hh"
#include "G4SDManager.hh"
#include "TFile.h"
#include "TTree.h"

class OurSensitiveDetector : public G4VSensitiveDetector
{
public:
	OurSensitiveDetector(G4String name);
	virtual ~OurSensitiveDetector();

	 void Initialize(G4HCofThisEvent* hc);
     G4bool ProcessHits(G4Step* step, G4TouchableHistory*);
     void EndOfEvent(G4HCofThisEvent* hc);

private:
	G4THitsCollection<OurHit>* ourCollection;
	G4double totalEnergy, nTotal, gTotal, nNonTotal, gNonTotal; 
	double neutronKE, gammaKE;
	TFile* ourTFile;
	TTree* ourTTree; 
	TTree* ourTTree2;
};

#endif
